1. Field of the Invention
The present invention relates to a control method of a surface texture measuring apparatus. Specifically, the present invention relates to a control method of a surface texture measuring apparatus to displace a sensor in a displacement path that does not interfere with a measured object (hereafter referred to as a work piece) when measuring the work piece with the surface texture measuring apparatus.
2. Description of Related Art
Conventionally, in an image measuring apparatus of a CNC (Computer Numerical Control) type, a part program having descriptions of a measurement condition of a work piece has generally been created using the following two methods. A first method is on-line teaching. In the on-line teaching, by placing the actual work piece on the measuring apparatus, the work piece is actually measured manually while the measurement procedure is stored in the image measuring apparatus. A second method is off-line teaching. In the off-line teaching, two-dimensional CAD data of the work piece is captured and displayed on a display, and the measurement procedure is programmed by typing in a command with an inputter (such as a mouse or a keyboard) while referring to the two-dimensional CAD data (see Japanese Patent No. 3596753 (issued Dec. 2, 2004), Japanese Patent No. 4812477 (issued Nov. 9, 2011), and Japanese Patent No. 4932202 (issued May 16, 2012), for example).
Creating a measuring part program with the off-line teaching is outlined below. FIG. 1 is an exemplary GUI (Graphical User Interface) screen 121 provided to a user in order to set up the measurement procedure (measurement condition) with the off-line teaching. FIG. 1 displays the CAD data of the work piece in an upper left corner window 125. In this example, a plan view of the work piece is displayed.
As an example, in the plan view of the work piece, a circle C1 is positioned in a lower left and a circle C2 is positioned in an upper right. The user performs a circle measurement of the circle C1 (such as measurement of a center and a diameter) followed by the circle measurement of the circle C2. In this case, the measurement procedure (measurement condition) is defined and entered such that a camera is displaced from a position immediately above the circle C1 to a position immediately above the circle C2. In the GUI screen 121, a command frequently used to define the measurement procedure (measurement condition) is provided as an icon 140. Further, the measurement procedure (measurement condition) defined and entered by the user is displayed clearly in an editing window 122.
The editing window 122 is clearly displayed in a language used in daily life (editing language), rather than in a professional programming language, and thus anybody can easily understand what the language communicates. While looking at the editing window 122, the user can readily perform editing tasks (such as insert, delete, and change) of the measurement procedure (measurement condition) in the middle of the procedure. The user enters the measurement procedure (measurement condition) by operating the provided command icon 140 using the mouse and by entering a numerical value using the keyboard.
When the user sets up the measurement procedure (measurement condition) in which the circle measurement of the circle C1 is performed, then the circle measurement of the circle C2 is performed, the following procedure is performed, for example. First, the user defines a move command 1 to displace the camera to a position immediately above the circle C1. The user clicks a move command icon 141, which is a command icon commanding displacement, and enters (center) coordinates (x1, y1, z1) of the circle C1 (destination). The user may type in the center coordinates of the circle C1 directly using the keyboard or the center of the circle may be automatically recognized from the CAD data by clicking a desired point on a circumference of the circle C1, for example. Thereafter, the user clicks a circle measurement command icon 142, which is the command icon for the circle measurement.
Next, the user defines a move command 2 to displace the camera to a position immediately above the circle C2. In other words, the user clicks the move command icon 141 and enters the center coordinates (x2, y2, z2) of the circle C2. Then, the user clicks the circle measurement command icon 142. In this way, the measurement procedure (measurement condition) is defined.
An image measuring system expands and converts the defined and entered measurement procedure (measurement condition) to the part program language which the image measuring apparatus can read and execute. By converting a set of commands of the measurement conditions defined in the editing language by the user to a set of commands in the part program language, a part program can be created in which the image measuring apparatus executes the measurement desired by the user. In this way, the part program is created by the off-line teaching using the two-dimensional CAD data. The measurement of the work piece is performed by reading and executing the part program with the image measuring apparatus. Specifically, after the circle measurement of the circle C1 is performed, the circle measurement of the circle C2 is performed by displacing the camera to the position immediately above the circle C2.
The two-dimensional CAD data, unlike three-dimensional CAD data, do not have three-dimensional information. Therefore, when the part program is created by the off-line teaching using the two-dimensional CAD data, the image measuring system cannot obtain information related to a three-dimensional shape of the work piece. Even with a step or a projection standing on a displacement path of the camera, the image measuring system cannot recognize the step or the projection, and naturally fails to perform an interference check automatically. When the image measuring apparatus executes the part program as is, as shown in FIG. 2 for example, a camera 16 may come into contact with a projection B0.
Conventionally, the image measuring apparatus has used a relatively flat measured object, and therefore, there was no concern that the camera 16 might touch a work piece W on the displacement path. However, a work piece having relatively large unevenness may need to be measured using the image measuring apparatus in the future, and this need must be addressed. Accordingly, a part program generating device of an image measuring apparatus is required which easily creates, in the off-line teaching using the two-dimensional CAD data, a part program avoiding the interference between the camera and the work piece.